﻿@model List<NC.Cather.UrlList>

@using NC.Web.Models
    @{
    ViewBag.Title = "Index";
    }


@{
    string targetId = Request.QueryString["targetId"];
}

<section class="content-header">
        <h1>
            @(ViewBag.targetName)网站分类列表信息列表管理
        </h1>
        <ol class="breadcrumb">
            <li><a href="@Url.Action("Index","Target")"><i class="fa fa-dashboard"></i>网站列表</a></li>
        </ol>
    </section>

    <section class="content">
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">@(ViewBag.targetName)网站分类列表信息列表信息</h3>
                <div class="row" style="margin-top: 20px;">
                </div>
            </div>

         <div class="box-body no-padding">
                <div class="mailbox-controls">
                    <!-- Check all button -->
                    <button class="btn btn-default btn-sm checkbox-toggle" id="checkAll"><i class="glyphicon glyphicon-check"></i></button>
                    <div class="btn-group">
                        <a href="@Url.Action("Create",new {targetId=targetId})" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-plus"></i></a>
                        <button class="btn btn-default btn-sm" onclick="deleteData('@Url.Action("Delete")')"><i class="glyphicon glyphicon-trash"></i></button>
                        <button class="btn btn-default btn-sm" onclick="window.location.reload(true);"><i class="glyphicon glyphicon-refresh"></i></button>
                    </div>
                </div>
                <div class="table-responsive mailbox-messages">
                    <table class="table table-hover table-striped">
                        <thead>
                            <tr>
                                <th></th>
                                <th>
                                    网站地址
                                </th>
                                <th>
                                    名称
                                </th>
                                <th>
                                    容器选择器
                                </th>
                                
                                <th>
                                    a标签选择器
                                </th>
                                <th>
                                    是否开启分页
                                </th>
                                
                                <th>
                                    分页模板
                                </th>
                                <th>
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var item in Model)
                            {
                            <tr>
                                <td>
                                    <input type="checkbox" data-id="@item.Id" />
                                </td>
                                
                                <td>
                                    @Html.DisplayFor(modelItem => item.Url)
                                </td>
                                
                                <td>
                                    @Html.DisplayFor(modelItem => item.Name)
                                </td>
                                
                                <td>
                                    @Html.DisplayFor(modelItem => item.ContentSelector)
                                </td>
                                
                                <td>
                                    @Html.DisplayFor(modelItem => item.ASelector)
                                </td>

                                <td>
                                    @(item.EnablePager?"是":"否")
                                </td>
                                
                                <td>
                                    @Html.DisplayFor(modelItem => item.PagerSelector)
                                </td>
                                
                                <td>
                                    <div class="btn-group">
                                        <div class="btn btn-default" onclick="deleteData('@Url.Action("Delete",new {targetId=targetId})','@item.Id')"><i class="glyphicon glyphicon-trash"></i></div>
                                        <a class="btn btn-default" href="@Url.Action("Edit", new { id=item.Id,targetId=targetId})"><i class="glyphicon glyphicon-edit"></i></a>
                                    </div>
                                </td>
                            </tr>
                            }
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="box-footer clearfix">
                @{ int count = Convert.ToInt32(ViewBag.count);}
                @Html.PageList(Url.Action("Index") ,count)
            </div>

        </div><!-- /.box-header -->
           
    </section>
    <script src="~/Content/Assert/Js/Common.js"></script>
<script type="text/javascript">

</script>
    
    
